﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Sablon.Master" AutoEventWireup="true" CodeBehind="musterigrouptanimla.aspx.cs" Inherits="OnlineDovizOtomasyonu.musterigrouptanimla" %>
<%@ Register assembly="DevExpress.Web.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .style1
    {
        width: 100%;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="0" class="style1">
    <tr>
        <td>
            <dx:ASPxRoundPanel ID="panelGroupTanimla" runat="server" 
                HeaderText="Müşteri Group Tanımla" Theme="Aqua" Width="100%">
                <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td height="20" width="150">
                Group Kodu</td>
            <td width="5">
                :</td>
            <td>
                <dx:ASPxTextBox ID="txtKod" runat="server" Theme="Aqua" Width="100px">
                    <ValidationSettings>
                        <RequiredField ErrorText="Group Kodu Giriniz" IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td height="20">
                Group Adı</td>
            <td>
                :</td>
            <td>
                <dx:ASPxTextBox ID="txtAd" runat="server" Theme="Aqua" Width="200px">
                    <ValidationSettings>
                        <RequiredField ErrorText="Group Adını Giriniz." IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
        <tr>
            <td height="20">
                Açıklama</td>
            <td>
                :</td>
            <td>
                <dx:ASPxMemo ID="txtAciklama" runat="server" Height="71px" Theme="Aqua" 
                    Width="200px">
                </dx:ASPxMemo>
            </td>
        </tr>
        <tr>
            <td height="20">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                <table cellpadding="0" cellspacing="0" class="style1">
                    <tr>
                        <td width="100" align="left">
                            <dx:ASPxButton ID="btnKaydet" runat="server" Text="Kaydet" Theme="Aqua" 
                                AutoPostBack="False" HorizontalAlign="Left" OnClick="btnKaydet_Click" 
                                Width="100px">
                                <Image Url="~/images/icon/butonkaydet.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td width="100" align="left">
                            <dx:ASPxButton ID="btnTemizle" runat="server" Text="Temizle" Theme="Aqua" 
                                HorizontalAlign="Left" OnClick="btnTemizle_Click" Width="100px">
                                <Image Url="~/images/icon/temizle.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td width="100%">
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
                    </dx:PanelContent>
</PanelCollection>
            </dx:ASPxRoundPanel>
        </td>
    </tr>
    <tr>
        <td>
            <dx:ASPxRoundPanel ID="panelMusteriGroupKayitlari" runat="server" 
                HeaderText="Müşteri Group Kayıtları" Theme="Aqua" Width="100%">
                <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <dx:ASPxGridView ID="lstgroupkayitlari" runat="server" 
        AutoGenerateColumns="False" DataSourceID="webingdovizlistelericinbaglanti" 
        EnableTheming="True" KeyFieldName="ID" Theme="Aqua" Width="100%">
        <Columns>
            <dx:GridViewCommandColumn ButtonType="Image" Caption="İşlemler" 
                ShowInCustomizationForm="True" VisibleIndex="4" Width="50px">
                <EditButton Text="Düzenle" Visible="True">
                    <Image AlternateText="Düzenle" Height="16px" Url="~/images/icon/duzenle.png" 
                        Width="16px">
                    </Image>
                </EditButton>
                <DeleteButton Text="Sil" Visible="True">
                    <Image AlternateText="Sil" Height="16px" Url="~/images/icon/sil.png" 
                        Width="16px">
                    </Image>
                </DeleteButton>
                <CancelButton Text="Vazgeç">
                    <Image AlternateText="Vazgeç" Url="~/images/icon/vazgec.png">
                    </Image>
                </CancelButton>
                <UpdateButton Text="Vazgeç">
                    <Image AlternateText="Kaydet" Height="16px" Url="~/images/icon/kaydet.png" 
                        Width="16px">
                    </Image>
                </UpdateButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="ID" ReadOnly="True" 
                ShowInCustomizationForm="True" Visible="False" VisibleIndex="0">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Group Kodu" FieldName="KODU" 
                ShowInCustomizationForm="True" VisibleIndex="1" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Group Adı" FieldName="ADI" 
                ShowInCustomizationForm="True" VisibleIndex="2" Width="40%">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataMemoColumn Caption="Açıklama" FieldName="ACIKLAMA" 
                ShowInCustomizationForm="True" VisibleIndex="3" Width="60%">
            </dx:GridViewDataMemoColumn>
        </Columns>
        <SettingsPager>
            <Summary AllPagesText="Sayfa: {0} - {1} ({2} Kayıt)" 
                Text="Sayfa {0} İle {1} ({2} Kayıt)" />
        </SettingsPager>
        <SettingsEditing EditFormColumnCount="1" Mode="PopupEditForm" />
        <SettingsText EmptyDataRow="Herhangi Bir Kayıt Bulunamadı!" 
            PopupEditFormCaption="Müşteri Group Kaydı Düzenle" />
        <SettingsLoadingPanel Text="Yükleniyor..." />
        <SettingsPopup>
            <EditForm Height="170px" HorizontalAlign="WindowCenter" Modal="True" 
                VerticalAlign="WindowCenter" Width="500px" />
        </SettingsPopup>
        <StylesPopup>
            <Common>
                <ModalBackground Opacity="80">
                    <BackgroundImage ImageUrl="~/images/zeminler/beyazcizgili.JPG" />
                </ModalBackground>
            </Common>
        </StylesPopup>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="webingdovizlistelericinbaglanti" runat="server" 
        ConflictDetection="CompareAllValues" 
        ConnectionString="<%$ ConnectionStrings:webingdovizlistelericinbaglanti %>" 
        DeleteCommand="DELETE FROM [WEBINGDOVIZ_TBLGROUP] WHERE [ID] = @original_ID AND (([KODU] = @original_KODU) OR ([KODU] IS NULL AND @original_KODU IS NULL)) AND (([ADI] = @original_ADI) OR ([ADI] IS NULL AND @original_ADI IS NULL)) AND (([ACIKLAMA] = @original_ACIKLAMA) OR ([ACIKLAMA] IS NULL AND @original_ACIKLAMA IS NULL))" 
        InsertCommand="INSERT INTO [WEBINGDOVIZ_TBLGROUP] ([KODU], [ADI], [ACIKLAMA]) VALUES (@KODU, @ADI, @ACIKLAMA)" 
        OldValuesParameterFormatString="original_{0}" 
        SelectCommand="SELECT * FROM [WEBINGDOVIZ_TBLGROUP] ORDER BY [ADI]" 
        UpdateCommand="UPDATE [WEBINGDOVIZ_TBLGROUP] SET [KODU] = @KODU, [ADI] = @ADI, [ACIKLAMA] = @ACIKLAMA WHERE [ID] = @original_ID AND (([KODU] = @original_KODU) OR ([KODU] IS NULL AND @original_KODU IS NULL)) AND (([ADI] = @original_ADI) OR ([ADI] IS NULL AND @original_ADI IS NULL)) AND (([ACIKLAMA] = @original_ACIKLAMA) OR ([ACIKLAMA] IS NULL AND @original_ACIKLAMA IS NULL))">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_KODU" Type="String" />
            <asp:Parameter Name="original_ADI" Type="String" />
            <asp:Parameter Name="original_ACIKLAMA" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="KODU" Type="String" />
            <asp:Parameter Name="ADI" Type="String" />
            <asp:Parameter Name="ACIKLAMA" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="KODU" Type="String" />
            <asp:Parameter Name="ADI" Type="String" />
            <asp:Parameter Name="ACIKLAMA" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_KODU" Type="String" />
            <asp:Parameter Name="original_ADI" Type="String" />
            <asp:Parameter Name="original_ACIKLAMA" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
                    </dx:PanelContent>
</PanelCollection>
            </dx:ASPxRoundPanel>
        </td>
    </tr>
</table>
</asp:Content>
